﻿<!DOCTYPE html>
<html lang="en" class="ace ace-card-on ace-tab-nav-on ace-main-nav-on ace-sidebar-on" data-theme-color="#c0e3e7">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">

    <title>share</title>
    <meta name="description" content="">

    <link rel="apple-touch-icon" href="${request.contextPath}/images/apple-touch-icon.png">
    <link rel="shortcut icon" href="${request.contextPath}/images/favicon.ico">

    <!-- Google Fonts -->
    <link href="https://fonts.googleapis.com/css?family=Quicksand:400,700" rel="stylesheet">
    <link href="https://fonts.googleapis.com/css?family=Pacifico" rel="stylesheet">

    <!-- Icon Fonts -->
    <link href="${request.contextPath}/fonts/icomoon/style.css" rel="stylesheet">

    <!-- Styles -->
    <link href="${request.contextPath}js/plugins/highlight/solarized-light.css" rel="stylesheet">
    <link href="${request.contextPath}/style.css" rel="stylesheet">

    <!-- Modernizer -->
    <script type="text/javascript" src="${request.contextPath}/js/vendor/modernizr-3.3.1.min.js"></script>
  </head>
  <body>
     <div class="ace-wrapper">
         <header id="ace-header" class="ace-container-shift ace-logo-in ace-head-boxed ace-nav-right">
             <center><h2>Share</h2></center>
             <div class="ace-head-inner">
                 <div class="ace-head-container ace-container">
                     <div class="ace-head-row">
                         <div id="ace-head-col3" class="ace-head-col text-right">
                             <button id="ace-sidebar-btn" class="btn btn-icon btn-light btn-shade">
                                 <span class="ace-icon ace-icon-side-bar-icon"></span>
                             </button>
                         </div>
                     </div>
                 </div>
             </div>
        </header>
         <p>
             <#if message??>
                 ${message}
             </#if>
         </p>
        <article id="ace-card" class="ace-card bg-primary">
			<div class="ace-card-inner text-center">
				<img class="avatar avatar-195" src="${request.contextPath}/img/uploads/avatar/avatar-195x195.png" width="195" height="195" alt="">
                <h1>${fileModel.filename}</h1>
				<p class="text-muted">${fileModel.filetype}</p>
			</div>

			<footer class="ace-card-footer">
				<a class="btn btn-lg btn-block btn-thin btn-upper " href="/download/filename/${fileModel.filename}">Download</a>
                <a href="/look">下一个>>>></a>
			</footer>
		</article><!-- #ace-card -->

        <div id="ace-content" class="ace-container-shift">
            <div class="ace-container">
                <div class="ace-paper-stock">
                    <main class="ace-paper clearfix">
                        <div class="ace-paper-cont clear-mrg">
						
						<!-- START: PAGE CONTENT -->
    <div class="padd-box clear-mrg">
        <section class="section brd-btm">
            <div class="row">
                <div class="col-sm-12 clear-mrg text-box">
                    <h2 class="title-lg text-upper">About the File</h2>

                    <p><b>文件简介</b><br>
                        ${fileModel.fileshort}
                    </p>
                </div>
            </div>
        </section>

        <section class="section brd-btm">
            <div class="row">
                <div class="col-sm-6 clear-mrg">
                    <h2 class="title-thin text-muted">提供者信息</h2>
                    <dl class="dl-horizontal clear-mrg">
                        <dt class="text-upper">姓名</dt>
                        <dd>${userInfo.username}</dd>

                        <dt class="text-upper">性别</dt>
                        <dd>${userInfo.sex}</dd>

                        <dt class="text-upper">微信</dt>
                        <dd><a href="zhaodongpo01@58.com">${userInfo.weixin}</a></dd>

                        <dt class="text-upper">电话</dt>
                        <dd>${userInfo.telephone}</dd>
                    </dl>
                </div>
            </div>
        </section>

        <section class="section brd-btm">
            <div class="row">
                <div class="col-sm-6 clear-mrg">
                    <h2 class="title-thin text-muted">用户评价数据图</h2>

                    <div class="row">
                        <div class="col-xs-4">
                            <div class="progress-chart ace-animate" role="progressbar" aria-valuenow="90" aria-valuemin="0" aria-valuemax="100">
                                <div class="progress-bar" data-text="90%" data-value="0.9"></div>
                                <strong class="progress-title">有用</strong>
                            </div>
                        </div><!-- .col-xs-4 -->

                        <div class="col-xs-4">
                            <div class="progress-chart ace-animate" role="progressbar" aria-valuenow="88" aria-valuemin="0" aria-valuemax="100">
                                <div class="progress-bar" data-text="81%" data-value="0.81"></div>
                                <strong class="progress-title">十分满意</strong>
                            </div>
                        </div><!-- .col-xs-4 -->

                        <div class="col-xs-4">
                            <div class="progress-chart ace-animate" role="progressbar" aria-valuenow="66" aria-valuemin="0" aria-valuemax="100">
                                <div class="progress-bar" data-text="66%" data-value="0.66"></div>
                                <strong class="progress-title">不满意</strong>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </section>

        <section class="section">
            <h2 class="title-thin text-muted">用户评价</h2>
            <#list bbsInfoList as list>
                评价内容:<p>${list.bbscontent}</p>
                评价时间:<p>${list.bbsdate}</p><br>
            <hr>
            </#list>
            <form  name="formpingjia" id="formpingjia">
                在此评价:<textarea type="text" name="bbscontent" id="bbscontent"></textarea>
                <input type="hidden" value="${fileModel.fid}" name = "fid" id="fid"/>
                <input type="hidden" value="${userInfo.uid}" name = "uid" id="uid"/>
                <input type="submit" name="submit" id="submit" onclick="submitform()"/>
            </form>
        </section>


        <script src="${request.contextPath}/js/jquery-1.11.0.js"></script>
        <script>
            function submitform(){
                var formData = new FormData($("#formpingjia")[0]);//用form 表单直接 构造formData 对象; 就不需要下面的append 方法来为表单进行赋值了。
                $.ajax({
                    async: false,
                    url : "/submitbbs",
                    type : 'POST',
                    data : formData,
                    processData : false,  //必须false才会避开jQuery对 formdata 的默认处理
                    contentType : false,  //必须false才会自动加上正确的Content-Type
                    success : function(result) {
                        alert(result);
                    }
                });
            }
        </script>

    </div>
                </div><!-- .ace-paper-cont -->
            </main><!-- .ace-paper -->
        </div><!-- .ace-paper-stock -->

        </div><!-- .ace-container -->
    </div><!-- #ace-content -->

    <div id="ace-sidebar">
		<button id="ace-sidebar-close" class="btn btn-icon btn-light btn-shade">
			<span class="ace-icon ace-icon-close"></span>
		</button>

		<div id="ace-sidebar-inner">
			<aside class="widget-area">
				<section class="widget widget_search">
					<form role="search" method="post" class="search-form" action="/searchFile">
						<label>
							<span class="screen-reader-text">Search for:</span>
							<input type="search" class="search-field" placeholder="Search" value="" name="filename" id="filename">
						</label>
						<button type="submit" class="search-submit">
							<span class="screen-reader-text">Search</span>
							<span class="ace-icon ace-icon-search"></span>
						</button>
					</form>
				</section>

				<section class="widget widget_posts_entries">
					<h2 class="widget-title">搜索结果</h2>
					<ul>
						<li>
							<div class="post-content">
								<h3>
									<a href="">文件名</a>
								</h3>
							</div>
						</li>
					</ul>
				</section>
                <h3>上传</h3>
                <form id="zhaoform" name="zhaoform">
                    文件名:<input type="text" name="filename" id="filename"/><br>
                    文件简介:<textarea name="fileshort" id="fileshort"></textarea><br>
                    文件类型:<input type="text" name="filetype" id="filetype"/><br>
                    文件:<input type="file" id="inputfile" name="inputfile">
                    <button class="btn btn-default" name="buts1" id="buts1" onclick="click1()">提交</button>
                </form>
			</aside>
		</div>
	</div>
</div>
     <script>
         function click1(){
             var formData = new FormData($("#zhaoform")[0]);//用form 表单直接 构造formData 对象; 就不需要下面的append 方法来为表单进行赋值了。
             $.ajax({
                 async: false,
                 url : "/uploadfileforshard",
                 type : 'POST',
                 data : formData,
                 processData : false,  //必须false才会避开jQuery对 formdata 的默认处理
                 contentType : false,  //必须false才会自动加上正确的Content-Type
                 success : function(result) {
                     alert(result);
                 }
             });
         }
     </script>

<script type="text/javascript" src="${request.contextPath}/js/vendor/jquery-1.12.4.min.js"></script>
<script type="text/javascript" src="${request.contextPath}/js/plugins/highlight/highlight.pack.js"></script>
<script type="text/javascript" src="${request.contextPath}/js/plugins/jquery.mCustomScrollbar.min.js"></script>
<script type="text/javascript" src="${request.contextPath}/js/plugins/isotope.pkgd.min.js"></script>
<script type="text/javascript" src="${request.contextPath}/js/plugins/progressbar.min.js"></script>
<script type="text/javascript" src="${request.contextPath}/js/plugins/slick.min.js"></script>
<script type="text/javascript" src="${request.contextPath}/js/options.js"></script>
<script type="text/javascript" src="${request.contextPath}/js/main.js"></script>
</body>
</html>
